home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1994 November / Cd Ware (Nro. 2) - Epimundo.iso / DOS / UD / DOC2COM.ZIP / README.COM (.txt) < prev   
Encoding:
DOC2COM (Gerald DePyper)  |  1994-05-18  |  21.9 KB  |  441 lines

  1.  
  2.             DOC2COM / D2COLOR Version 1.31
  3.                   Table of contents
  4.  
  5.     1.00  Introduction .................................. p. 1
  6.     2.00  Requirements .................................. p. 1
  7.     3.00  Using DOC2COM to create a self-display file ... p. 1
  8.       3.10  Additional command line parameters .......... p. 2
  9.         3.11  A word about data security ................ p. 3
  10.     4.00  Browsing the self-display file ................ p. 4
  11.     5.00  Guidelines for the text file .................. p. 4
  12.       5.10    Providing for special colors ................ p. 5
  13.     6.00  Using D2COLOR to set screen colors ............ p. 6
  14.       6.10    Setting special colors ...................... p. 6
  15.     7.00  Possible problems ............................. p. 7
  16.     8.00  Shareware Registration Guidelines ............. p. 8
  17.  
  18.       Wanna start quick? Read sections 1.00 and 3.00, then go to it!
  19.  
  20.             Alt-P = Print this document
  21.                F1 = Help
  22.  
  23.        DOC2COM / D2COLOR 1.31 copyright 1991, 1994 by Jerry DePyper
  24.    Use of these programs without the author's permission is prohibited.
  25.  
  26.                 - 1 -
  27.  
  28.     1.00  Introduction
  29.     ==================
  30.  
  31.     Did you ever create a documentation or informational text file
  32.     for people to look at or print?  DOC2COM can make a self-browsing
  33.     file out of it.  DOC2COM uses the text file as a base for
  34.     creating a '.com' file that can be executed as a callable DOS
  35.     program.  I designed it so I could create manual.com and
  36.     readme.com files (like this one) to distribute with my shareware
  37.     program packages.
  38.  
  39.     DOC2COM accomplishes its task by appending your text file
  40.     contents to some machine code logic for displaying, scrolling,
  41.     etc, and by calculating some basic internal variable values.
  42.     It then writes the whole thing out as a .com file in one
  43.     effortless step.
  44.  
  45.  
  46.     2.00  Requirements
  47.     ==================
  48.  
  49.     1. MS-DOS or PC-DOS 2.0 or later
  50.     2. IBM or compatible
  51.     3. 25 x 80 display mode
  52.     4. RAM memory = 2500 to 4000 bytes + text file size
  53.     (In other words, almost any IBM-compatible system will do.)
  54.  
  55.  
  56.  
  57.     3.00  Using DOC2COM to create a self-display file
  58.     =================================================
  59.  
  60.     Using DOC2COM is easy. In its simplest form, the command line
  61.     looks like this:
  62.  
  63.             DOC2COM docfile
  64.  
  65.     where 'docfile' is the input ASCII text file.  In this case,
  66.     DOC2COM would create an    executable '.com' file in the current
  67.     directory using the same name as 'docfile', but with a .com
  68.     extension. The input text file must not have the .com extension,
  69.     and any already existing file with the same name and a .com
  70.     extension will be overwritten without warning.
  71.     
  72.     That's all you need to know to create self-displaying text
  73.     files. If you want some more details, read on. If not, go to
  74.     it! (But please come back here sometime to read section 8.00
  75.     about registering your copy with me.)
  76.                 - 2 -
  77.  
  78.     3.10  Additional command line parameters
  79.     ========================================
  80.  
  81.     For more control, you may include one or more optional
  82.     command line parameters. The complete command line syntax is:
  83.     
  84.         DOC2COM docfile [comfile] [/e] [/n] [/s] [/p-nn] [/0|1|2]
  85.                               
  86.     where 'comfile' is the name of the .com self-displaying file
  87.     created by DOC2COM. By including this parameter, you may
  88.     give a name to your self-displaying file independently of the
  89.     input text file's name. You may also specify a different
  90.     drive and path where it will be created.
  91.  
  92.     '/e' is a switch that means all extended ASCII characters in
  93.     the text file will be displayed by the self-displaying file.
  94.     If this switch is omitted, only text characters will appear.
  95.     The text you are reading, and the double-dash lines used for
  96.     emphasis, (i.e. anything you can type from the keyboard), are
  97.     examples of true text characters. A good example of non-text
  98.     characters (extended ASCII) are the following figures:
  99.  
  100.     ╔══════════════╤══════════════╤══════════════╗       █████████████
  101.     ║              │              │              ║       █████████████
  102.     ║              │              │              ║       █████████████
  103.     ║              │              │              ║       ▓▓▓▓▓▓▓▓▓▓▓▓▓
  104.     ║              │              │              ║       ▓▓▓▓▓▓▓▓▓▓▓▓▓
  105.     ║              │              │              ║       ▓▓▓▓▓▓▓▓▓▓▓▓▓
  106.     ║              │              │              ║       ▒▒▒▒▒▒▒▒▒▒▒▒▒
  107.     ╟──────────────┼──────────────┼──────────────╢       ▒▒▒▒▒▒▒▒▒▒▒▒▒
  108.     ║              │              │              ║       ▒▒▒▒▒▒▒▒▒▒▒▒▒
  109.     ║              │              │              ║       ░░░░░░░░░░░░░
  110.     ║              │              │              ║       ░░░░░░░░░░░░░
  111.     ╚══════════════╧══════════════╧══════════════╝       ░░░░░░░░░░░░░
  112.  
  113.     I wanted them to display, so I entered this command:
  114.  
  115.             doc2com readme.doc /e
  116.     
  117.     to create the readme file you are browsing.
  118.  
  119.     ----------------
  120.  
  121.     '/n' = No text encryption.
  122.     (See "3.11  A word about data security" below.)
  123.  
  124.     '/s' = disable shadows: As of version 1.3, the little pop-up
  125.     windows now cast 'shadows', which give the self-displaying file
  126.     a more polished look on color systems. You may disable these
  127.     shadows with the '/s' switch.
  128.  
  129.                                - 3 -
  130.  
  131.         '/p-nn' is a switch that allows you to adjust the page counter.
  132.     (See 4.00 below for page jumping in the self-display file.)
  133.     By default, all text documents start on page #1, and increment
  134.     the page counter at every form-feed (page-break) character.
  135.     Sometimes, however, you may have some header information,
  136.     like the table of contents above, that you don't want to count
  137.     as a page. Many times a document file will even start with
  138.     a form-feed character, which will cause the page counter to
  139.     increment before you even get started. Well, anyway, this
  140.     switch allows you some control over the internal page numbering
  141.     of the self-display file.
  142.  
  143.     For example, because of the table of contents, what I
  144.     considered as page #1 of this readme document was really the
  145.     2nd page. To tell DOC2COM to adjust the page counter by -1,
  146.     I included the /p switch as follows:
  147.  
  148.             doc2com readme.doc /e /p-1
  149.  
  150.     ----------------
  151.  
  152.     The 4th command line switch, also new in version 1.3, is used
  153.     to control how many features the self-display file will have,
  154.     and therefore, how much overhead will be added to the text
  155.     file in making the self-display file. This switch can be set
  156.     to one of three settings: /0, /1, or /2. If not used, the full-
  157.     feature setting /2 is assumed. Here is how the three settings
  158.     compare:
  159.  
  160.     |---------|------------------------|--------------------------------|
  161.     | Setting |      Overhead       |           Features         |
  162.     |      | (Bytes added to Text)  |                    |
  163.     |=========|========================|================================|
  164.     |   /0      |       ±1700       |  Scroll Up, Down, PgUp, PgDn   |
  165.     |      |               |  Home, End, Help            |
  166.     |---------|------------------------|--------------------------------|
  167.     |   /1      |       ±2500       |  Above plus jump to specific   |
  168.     |      |               |  line ("L") or page ("P")      |
  169.     |---------|------------------------|--------------------------------|
  170.     |   /2      |       ±3300       |  Above plus print text (Alt-P) |
  171.     |(default)|               |  or create text file (Alt-F)   |
  172.     |---------|------------------------|--------------------------------|
  173.  
  174.     So, for little simple files, you may choose /0 or /1 to keep the
  175.     size of the .com file down. Not that 3300 bytes added is much
  176.     overhead, but this also gives you more control over the functionality
  177.     of the self-display files you create, as the following notes.
  178.  
  179.  
  180.  
  181.     3.11  A word about data security
  182.     ================================
  183.  
  184.     It's one thing for you to distribute a self-displaying text file.
  185.     It may be quite another to give your users the ability to clone your
  186.     original document. To address this security issue, DOC2COM now stores
  187.     all text in the self-display file in encrypted form. So, if you use
  188.     switch setting /0 or /1 to prevent the explicit cloning or printing
  189.     of the original document, you literally make it view-only text.
  190.  
  191.     As noted above, the /n switch will turn encryption off.
  192.  
  193.                 - 4 -
  194.  
  195.     4.00  Browsing the self-display file
  196.     ====================================
  197.  
  198.     You can see from the readme.com file you are now browsing how
  199.     these self-displaying programs will behave.  After you typed
  200.     'readme' to invoke this, you may have instinctively started using
  201.     the cursor movement keys to move around. Or, if you hit some
  202.     other keys, you quickly saw from the little pop-up message which
  203.     keys to use.  And did you notice the horizontal page dividers?
  204.     They correspond to the presence of the form-feed character (0C hex)
  205.     in the text file, which is the same character that would cause a
  206.     new page to print if you routed the text file to a printer.
  207.  
  208.     Unless you specify switch /0, the self-display file will allow
  209.     the viewer to jump directly to any page or line of the document
  210.     via the 'P' and 'L' keys respectively. This is especially nice
  211.     in larger files such as a self-displaying manual or instructional
  212.     document.
  213.  
  214.     Unless you use switch /0 or /1, the viewer may also use the 'Alt-F''
  215.     keystroke to create a clone of the original text file, or 'Alt-P'
  216.     to route it to his printer. For example, you may print out this
  217.     readme text at any time via 'Alt-P', then use the resulting document
  218.     as a reference manual for using DOC2COM and D2COLOR. In the same
  219.     manner, you may use 'Alt-F' to create a copy of the document I used
  220.     to create this self-display readme.com.
  221.     
  222.  
  223.     5.00  Guidelines for the text file
  224.     ==================================
  225.  
  226.     Generally speaking, the guidelines for creating a good text file
  227.     for DOC2COM to use are the same as for producing a file that can
  228.     easily be printed on a variety of printers:
  229.  
  230.     1. Keep line length to 80 columns or less.
  231.     2. Eliminate special word-processing characters or format strings.
  232.        (Most word processers have a 'text file' mode that does this.)
  233.  
  234.     With version 1.3 of DOC2COM, when the viewer uses 'Alt-F' or
  235.     'Alt-P', he may no longer get exactly what you put in the original
  236.     document, as was the case in version 1.2. Instead, he will get
  237.     what he sees. For example, if there are extended ASCII characters
  238.     in your text document, these will be reproduced in the cloned file
  239.     and/or sent to the printer only if you used the /e switch to allow
  240.     them to display. Be aware that these extended ASCII box and shade
  241.     characters are not recognized by some printers. You can test your
  242.     printer by using 'Alt-P' to print this text with its box characters.
  243.     If you want to play it safe, use dashes, etc, instead of extended
  244.     ASCII. Likewise, the 'trigger' characters as discussed below will
  245.     not show up in a document cloned or printed via 'Alt-F' or 'Alt-P'.
  246.  
  247.  
  248.                 - 5 -
  249.  
  250.     5.10  Providing for special colors
  251.     ==================================
  252.  
  253.     Generally, the files produced by DOC2COM will display all text in
  254.     the same screen color, which can be changed through D2COLOR (see
  255.     section 6.00 below). As you see in this readme file, however, you
  256.     can also highlight some words by setting the screen color for
  257.     them differently. This is accomplished by means of 'trigger'
  258.     characters which you embed in the text, and which will signal
  259.     DOC2COM to change the screen color. These 'trigger' characters
  260.     and their associated color attributes are then specified through
  261.     D2COLOR as well (see section 6.10 below).
  262.  
  263.     The display algorithm in the self-display file scans all text a
  264.     line at a time, from left to right. When it encounters a trigger
  265.     character, it begins displaying all text to the right of it in
  266.     the alternate color associated with that trigger, until it
  267.     encounters another trigger, or it comes to the end of the line.
  268.     The next line will revert to the default color, unless it, too,
  269.     has a trigger character.
  270.     
  271.     You will usually want to choose as trigger characters something
  272.     which is not used, or used rarely in the body of your document.
  273.     For example, I don't use the curly bracket characters '{' and '}'
  274.     much, so I chose to use them as trigger characters. Namely, the
  275.     left bracket '{' I designate to set to a bright blue color on
  276.     a blue background (hex 1B), and the right bracket '}' to reset
  277.     to my normal white on blue (hex 17). By embedding them at the
  278.     right places in my text, I can highlight a word or a line. Thus,
  279.     this text:
  280.         An example of {highlighting until the end of the line
  281.         An example of a single {highlighted} word
  282.  
  283.     displays as
  284.         An example of highlighting until the end of the line
  285.         An example of a single highlighted word
  286.     
  287.     If you want to actually display one of these characters, rather
  288.     than use it as a trigger, simply enter it twice. So, in my case,
  289.     I had to key in '{{highlighted}}' above in order to get the
  290.     curly brackets to display.
  291.  
  292.     (Hint:    If you want to see just what my original document looked
  293.         like, make a copy of this readme.com, then use D2COLOR to
  294.          disable all trigger characters.)
  295.  
  296.     Up to 16 distinct trigger characters may be designated. You can
  297.     also use non-text (or exended ASCII) characters as triggers,
  298.     if your word processor or text editor can handle them. To learn
  299.     how to specify any chosen characters as triggers, see 6.10 below. 
  300.  
  301.                 - 6 -
  302.  
  303.     6.00  Using D2COLOR to set screen colors
  304.     ========================================
  305.  
  306.     I am now distributing D2COLOR.COM along with DOC2COM as a quick
  307.     patch utility to set the screen colors for DOC2COM or any self-
  308.     displaying .com files created by DOC2COM. D2COLOR is version-
  309.     specific; that is, version 1.31 of D2COLOR will only work with
  310.     DOC2COM 1.3 and 1.31 and self-display files created by DOC2COM
  311.     1.3 and 1.31.
  312.  
  313.     Using D2COLOR is also simple. Use the following command:
  314.  
  315.             D2COLOR comfile
  316.  
  317.     where 'comfile' is DOC2COM.COM or the self-displaying .com
  318.     file created by DOC2COM. You will be presented with a screen
  319.     showing you all the various screen colors available, and their
  320.     respective hexadecimal values. At the bottom you may pick from
  321.     any of these hex values to set the display colors for the main
  322.     body of text to be displayed, for the various pop-up windows,
  323.     and for the text keyed in by the viewer in answer to prompts.
  324.     
  325.     Hit F1 to save any color changes, or the Escape key to quit
  326.     without saving, or F2 to toggle to the trigger color screen.
  327.     
  328.  
  329.     6.10  Setting special colors
  330.     ==============================
  331.  
  332.     If you embedded special 'trigger' characters in your document
  333.     as outlined in section 5.10 above, you may specify what they
  334.     are, and what screen colors they will trigger, on screen #2
  335.     of D2COLOR. (Use F2 to toggle between the two screens.)
  336.     
  337.     In the upper positions, simply key in the special trigger
  338.     characters. Immediately below each one, key in the hex values
  339.     corresponding to the color desired.
  340.  
  341.     To key in a non-text trigger character (one that has no
  342.     corresponding key on the keyboard), hold down tha 'Alt' key,
  343.     and type the decimal value of that character using the number
  344.     pad keys. For example, the Yen symbol '¥' ASCII character has
  345.     a value of 157 decimal. So you hold down the 'Alt' key while
  346.     typing '157' on the number pad, and there it is!  ASCII
  347.     characters range in value from 0 to 255. Many DOS and other
  348.     reference material can be consulted to find out which
  349.     character is associated with each value.
  350.     
  351.     Do NOT use the carriage-return (value=13), line-feed (10),
  352.     form-feed (12), tab (9), or escape key (27) as triggers, as
  353.     they already have special significance to the program.
  354.  
  355.     ----------------
  356.  
  357.     When experimenting with different color combinations, I
  358.     recommend trying a variety of monitor types (e.g. color,
  359.     monochrome, LCD), if you can, to view your color schemes
  360.     on these various systems.
  361.                 - 7 -
  362.  
  363.  
  364.     7.00  Possible problems
  365.     =======================
  366.  
  367.     'Insufficient memory, or text file too big'
  368.         DOS limits .com files to 64K or smaller. So the text file
  369.         must be no larger than about 62000 or 63000 bytes, depending
  370.         upon whether you used switches /0 or /1.  If it is smaller,
  371.         and you still get this message, you may have a severe memory
  372.         problem.  DOC2COM only needs from 2500 to 4000 bytes plus
  373.         enough RAM for the text file.
  374.     'Error: file not found'
  375.         The input text file was not found. Check your spelling.
  376.     'File error, AL = __h'
  377.         AL = 03h - Path not found. Make sure the drive and path
  378.                specified really exist.
  379.         AL = 04h - Too many files open. Another application didn't
  380.                correctly close a bunch of files. If you shelled
  381.                to DOS from within another program, go back and
  382.                quit that program to force its files to close.
  383.                If a previous program cancelled, it may have left
  384.                files open, too. In this case, you may have to
  385.                re-boot to free up these file handles.
  386.         AL = 05h - Access denied. The .com file you tried to create
  387.                already exists as a read-only (and possibly
  388.                hidden) file.
  389.  
  390.  
  391.                 - 8 -
  392.  
  393.     8.00  Shareware Registration Guidelines
  394.     =======================================
  395.  
  396.     The DOC2COM/D2COLOR system is protected from unauthorized use
  397.     by U.S. copyright law. Anyone interested may evaluate these
  398.     programs free of charge. I also encourage you to pass them
  399.     along to others, especially to BBSs, distribution centers, and
  400.     user groups. If you like them, you should register with me in
  401.     the spirit of shareware by sending me $25.00 (check or money
  402.     order payable to Gerald DePyper) in return for my efforts.
  403.     
  404.     As of October 1992, you may register with me through Compu-
  405.     Serv Forum SWREG (GO SWREG). Look for Registration ID 308.
  406.     
  407.     A one-time registration of DOC2COM/D2COLOR entitles you to
  408.     distribute royalty-free all self-display files that you create
  409.     on an unlimited basis. You also get phone support plus free or
  410.     reduced cost upgrades and/or bug fixes when they may occur.
  411.     You may make as many copies as you need for backup or other
  412.     purposes, as long as you limit DOC2COM to a single machine. For
  413.     example, you may want to make several clones of DOC2COM, using
  414.     D2COLOR to set screen colors differently on each.
  415.  
  416.     If you are a starving shareware author, I won't make you pay.
  417.     But please register with me, and when you start making some
  418.     money on your programs, let me make a little on mine, too.
  419.  
  420.     If you are a large business, would like to run DOC2COM on
  421.     multiple machines, or if you would like some customized features,
  422.     please contact me for a custom agreement.
  423.  
  424.     In any case, I need to know who you are (name, address, etc.),
  425.     and where you got DOC2COM (name, address, of BBS, etc.), so
  426.     that I can distribute upgrade notices and bug fixes.
  427.  
  428.     Please send information, money, questions and comments to:
  429.  
  430.         Gerald DePyper
  431.         901 Argyle, #5A
  432.         Chicago, IL 60640
  433.         Phone:    312/907-8935
  434.          CompuServ ID: 71041,703
  435.  
  436.     P.S.(A Note From the Author)
  437.     Please don't be a computer-holic. A computer is, after all, only
  438.     a machine. Jesus is Lord. Keep everything else in perspective.
  439.     Have fun!
  440.  
  441.